﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Users.aspx.cs" Inherits="WebUI.SystemManage.Users" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <ext:PageManager runat="server" ID="PageManager1" AutoSizePanelID="Panel1" />
    <ext:Panel runat="server" ID="Panel1" BodyPadding="5px" EnableBackgroundColor="true"
        ShowBorder="false" Layout="Anchor" ShowHeader="true" Title="用户管理">
        <Items>
            <ext:Form runat="server" ID="Form2" LabelWidth="90px" Height="74px" EnableBackgroundColor="true"
                ShowHeader="false" ShowBorder="true" BodyPadding="10px" AutoWidth="true">
                <Toolbars>
                    <ext:Toolbar ID="Toolbar1" runat="server" Position="Top">
                        <Items>
                            <ext:Button runat="server" ID="bn_search" Text="查询" Icon="Reload" Type="Submit" OnClick="bnSearch_Click">
                            </ext:Button>
                            <ext:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
                            </ext:ToolbarSeparator>
                            <ext:Button runat="server" ID="bn_reset" Text="重置" Icon="ArrowIn" Type="Reset" OnClick="bnReset_Click">
                            </ext:Button>
                            <ext:ToolbarFill ID="ToolbarFill1" runat="server">
                            </ext:ToolbarFill>
                            <ext:Button runat="server" ID="bn_add" Text="新增" Icon="Add" Type="Button">
                            </ext:Button>
                        </Items>
                    </ext:Toolbar>
                </Toolbars>
                <Rows>
                    <ext:FormRow>
                        <Items>
                            <ext:TextBox runat="server" ID="tb_username" Label="用户名" TabIndex="1">
                            </ext:TextBox>
                            <ext:TextBox runat="server" ID="tb_name" Label="姓名" TabIndex="2">
                            </ext:TextBox>
                            <ext:TextBox runat="server" ID="tb_sid" Label="学号" TabIndex="3">
                            </ext:TextBox>
                            <ext:RadioButtonList runat="server" ID="rbl_role" Label="角色" TabIndex="4">
                                <ext:RadioItem Text="全部" Value="-1" Selected="true" />
                                <ext:RadioItem Text="学生" Value="0" />
                                <ext:RadioItem Text="老师" Value="1" />
                            </ext:RadioButtonList>
                        </Items>
                    </ext:FormRow>
                </Rows>
            </ext:Form>
            <ext:Grid runat="server" ID="Grid1" AnchorValue="100% -84px" ShowHeader="false" EnableBackgroundColor="true"
                EnableRowNumber="true" AllowPaging="true" OnPageIndexChange="Grid1_PageIndexChange"
                DataKeyNames="id" PageSize="25" OnRowCommand="Grid1_RowCommand">
                <Columns>
                    <ext:BoundField DataField="sid" HeaderText="学号" Width="160px" />
                    <ext:BoundField DataField="username" HeaderText="用户名" Width="160px" />
                    <ext:BoundField DataField="name" HeaderText="姓名" />
                    <ext:CheckBoxField DataField="isTeacher" HeaderText="是否老师" />
                    <ext:WindowField ColumnID="editField" HeaderText="编辑" Width="50px" WindowID="window1"
                        Icon="BulletEdit" DataIFrameUrlFormatString="UsersEdit.aspx?action=edit&id={0}"
                        DataIFrameUrlFields="id" DataWindowTitleFormatString="编辑 - 用户：{0}" DataWindowTitleField="username"
                        DataTextFormatString="{0}" ToolTip="修改用户信息" />
                    <ext:LinkButtonField Icon="TableDelete" HeaderText="删除" Width="50px" ToolTip="删除"
                        ConfirmText="确认删除？" CommandName="Del" />
                </Columns>
            </ext:Grid>
        </Items>
    </ext:Panel>
    <ext:Window runat="server" ID="window1" Width="560px" Height="300px" Popup="false" Icon="UserEdit"
        EnableMaximize="true" EnableCollapse="true" EnableIFrame="true" Title="用户管理"
        IsModal="true" EnableAjaxLoading="true">
    </ext:Window>
    </form>
</body>
</html>
